<#include file="public/header.html"#>

<div class="wrap">
    <div id="list-icon" class="f16">
        <div class="icon"><br /></div>
        内容
        <a class="button add-new" href="<#url class=Content function=add#>">添加新内容</a>
        <br class="clear" />
    </div>
    <div class="list">
        <table border="0" class="widefat" cellspacing="0">
            <thead>
                <tr class="f14 tb-title">
                <td>标题</td>
                <td>分类</td>
                <td width="150">日期</td>
                <td>操作</td>
                </tr>
            </thead>
            <#foreach from=$datas item=i#>
            <tr class="f12 tb-row">
                <td><#$i.title#></td>
                <td><#$i.catename#></td>
                <td><#$i.created|date_format:"%Y-%m-%d %H:%M:%S"#></td>
                <td>
                    <a href="<#url class=Content function=edit nid=$i.nid ac=editnode#>">编辑</a>
                    <a onclick="javascript:return doAction('delete',{mes:'Are you sure?'});" href="<#url class=Content function=delNode nid=$i.nid ac=delnode#>">删除</a>
                </td>
            </tr>
            <#/foreach#>
            <tfoot>
                <tr>
                    <td colspan="4"></td>
                </tr>
            </tfoot>
        </table>
    </div>
</div>
<script>
        function doAction(type,obj){
            switch(type){
                case 'delete':
                    return window.confirm(obj.mes);
                default:
                    return false;
            }
        }
</script>
<#include file="public/footer.html"#>